home *** CD-ROM | disk | FTP | other *** search
- !
- ! Copyright (c) 1998
- ! by CompuServe Incorporated, Columbus, Ohio
- !
- ! The information in this software is subject to change without
- ! notice and should not be construed as a commitment by CompuServe.
- !
- ! TELENET:
- ! Connect to SprintNet
- ! Success: returns %Success
- ! Failure: saves error msg in %FailureMsg and returns %Failure
- !
- !+V
- ! "4.0.5"
- !-V
-
- Attempts = 3;
- on cancel goto SprintNet_Cancelled;
- show "Connecting to SprintNet";
- send "@." & %CR;
- wait until 1; ! pause required for 2400 baud
- send %CR & %CR;
-
- Wait_SprintNet:
- if Attempts = 0 goto SprintNet_Failed;
- Attempts = Attempts - 1;
-
- wait
- "Terminal" goto send_telenet_id,
- "@" goto send_telenet_host,
- %mdm_Failure goto NO_Carrier
- until 85;
-
- send %CR & %CR;
- goto Wait_SprintNet;
-
- send_telenet_id:
- send "D1" & %CR;
- goto Wait_SprintNet;
-
- send_telenet_host:
- send "C 202202" & %CR;
- goto Wait_HostName;
-
- Wait_HostName:
- Tries = 3;
- goto Wait_UserID;
-
- Send_ToHostName:
- Tries = Tries - 1;
- send "/HOST" & %CR;
-
- Wait_UserID:
- if Tries = 0 goto SprintNet_Failed;
- wait
- %mdm_Failure goto NO_Carrier,
- "User ID:" goto Send_ToHostName,
- "Host Name:" goto Return_Success
- until 25;
- goto Send_ToHostName;
-
- Return_Success:
- exit %Success;
-
- NO_Carrier:
- define %FailureMsg = "Modem connection lost";
- exit %Failure;
-
- SprintNet_Failed:
- define %FailureMsg = "SprintNet: No answer";
- exit %Failure;
-
- SprintNet_Cancelled:
- exit %Cancel;
-